#pragma once

class DoUndoRedoBase
{
public:
    DoUndoRedoBase();
    ~DoUndoRedoBase();

    BOOL Undo(LPARAM& da);
    BOOL Redo(LPARAM& da);
    BOOL GetCurData(LPARAM& da);

    BOOL IsUndoEnable();
    BOOL IsRedoEnable();
    void AddUndoData(LPARAM data);
    void InitUndoData(LPARAM data);

    void InitUndoData2();
    void AddUndoData2();
    void Undo2();
    void Redo2();

private:

    int m_iCurUndoId;
    CArray<LPARAM, LPARAM&> m_UndoDataList;

    virtual LPARAM GetCurUndoData() = 0;
    virtual void SetCurUndoData(LPARAM da) = 0;
    virtual void SetUndoRedoEnable() = 0;

};
